import request from '@/utils/request'

// 道路分页
export function getTmRoadPage(params) {
  return request({
    url: '/admin/tm-road/page',
    method: 'get',
    params
  })
}

//根据道路ID查询路口
// /admin/tm-intersection/getListByRoadId
export function getTmIntersectionByRoadId(params) {
  return request({
    url: '/admin/tm-intersection/getListByRoadId',
    method: 'get',
    params
  })
}


// 信号灯分页查询
export function getTmSignalPage(params) {
  return request({
    url: '/admin/tm-traffic-light/page',
    method: 'get',
    params
  })
}

// 根据信号灯ID查询实时信号灯详情
// /admin/tm-real-time-traffic-light/page
export function getTmRealTimeTrafficLight(params) {
  return request({
    url: '/admin/tm-real-time-traffic-light/page',
    method: 'get',
    params
  })
}

// 根据信号灯ID更新
// /admin/tm-traffic-light/updateById
export function updateTmTrafficLight(data) {
  return request({
    url: '/admin/tm-traffic-light/updateById',
    method: 'post',
    data
  })
}

// 路况查询
// /admin/tm-traffic-info/page
export function getTmTrafficInfoPage(params) {
  return request({
    url: '/admin/tm-traffic-info/page',
    method: 'get',
    params
  })
}

// 反馈分页
// /admin/tm-user-feedback/page
export function getTmUserFeedbackPage(params) {
  return request({
    url: '/admin/tm-user-feedback/page',
    method: 'get',
    params
  })
}

// 反馈新增
// /admin/tm-user-feedback/insert
export function insertTmUserFeedback(data) {
  return request({
    url: '/admin/tm-user-feedback/insert',
    method: 'post',
    data
  })
}

// 反馈处理 /admin/tm-user-feedback/updateById
export function updateTmUserFeedback(data) {
  return request({
    url: '/admin/tm-user-feedback/updateById',
    method: 'post',
    data
  })
}

// 交通管制分页
// /admin/tm-traffic-control/page
export function getTmTrafficControlPage(params) {
  return request({
    url: '/admin/tm-traffic-control/page',
    method: 'get',
    params
  })
}

// 交通管制新增
// /admin/tm-traffic-control/insert
export function insertTmTrafficControl(data) {
  return request({
    url: '/admin/tm-traffic-control/insert',
    method: 'post',
    data
  })
}

// 交通管制删除
// /admin/tm-traffic-control/del
export function deleteTmTrafficControl(params) {
  return request({
    url: '/admin/tm-traffic-control/del',
    method: 'get',
    params
  })
}


// 交通事故分页查询
// /admin/tm-traffic-accident/page
export function getTmTrafficAccidentPage(params) {
  return request({
    url: '/admin/tm-traffic-accident/page',
    method: 'get',
    params
  })
}

// 交通事故新增
// /admin/tm-traffic-accident/insert
export function insertTmTrafficAccident(data) {
  return request({
    url: '/admin/tm-traffic-accident/insert',
    method: 'post',
    data
  })
}

// 交通事故删除
// /admin/tm-traffic-accident/del
export function deleteTmTrafficAccident(params) {
  return request({
    url: '/admin/tm-traffic-accident/del',
    method: 'get',
    params
  })
}

// 交通事故更新
// /admin/tm-traffic-accident/updateById
export function updateTmTrafficAccident(data) {
  return request({
    url: '/admin/tm-traffic-accident/updateById',
    method: 'post',
    data
  })
}


// 通告新增
// /admin/tm-notice/insert
export function insertTmNotice(data) {
  return request({
    url: '/admin/tm-notice/insert',
    method: 'post',
    data
  })
}

// 通告分页查询
// /admin/tm-notice/page
export function getTmNoticePage(params) {
  return request({
    url: '/admin/tm-notice/page',
    method: 'get',
    params
  })
}

// 通告删除
// /admin/tm-notice/del
export function deleteTmNotice(params) {
  return request({
    url: '/admin/tm-notice/del',
    method: 'get',
    params
  })
}